home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / System 7.0 Samples / CShell⁄THINK C / CShell.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-20  |  2.3 KB  |  99 lines  |  [TEXT/MPS ]

  1. #ifndef __CSHELL__
  2. #define __CSHELL__
  3.  
  4. #ifndef __TYPES__
  5. #include <types.h>
  6. #endif
  7.  
  8. #ifndef __APPLEEVENTS__
  9. #include <AppleEvents.h>
  10. #endif
  11.  
  12. #ifndef __FILES__
  13. #include <files.h>
  14. #endif
  15.  
  16. #ifndef __PRINTING__
  17. #include <printing.h>
  18. #endif
  19.  
  20. #ifndef __WINDOWS__
  21. #include <windows.h>
  22. #endif
  23.  
  24. /********/
  25.  
  26. typedef struct {
  27.     Boolean        docDirty;
  28.     Boolean        readOnly;
  29.     short        refNum;
  30.     FSSpec        fss;
  31.     WindowPtr    window;
  32. } FileStateRec, *FileStatePtr;
  33.  
  34. typedef struct {
  35.  
  36.     short            version;            /* The file format version.                   */
  37.     Boolean            printRecValid;        /* True if print record has been created.  */
  38.     TPrint            print;                /* Print record for file.                   */
  39.     short            endFileInfo;        /* Above info is saved to disk.               */
  40.  
  41.     long            windowID[2];        /* Used to match up windows.               */
  42.     short            endSendInfo;        /* Above is send info.                       */
  43.  
  44.     Boolean            connected;            /* Flag showing we are connected.           */
  45.     AEAddressDesc    remoteUserLoc;        /* AppleEvents address of remote user.       */
  46.     char            remoteUserName[34];    /* Name of user connected to.               */
  47.     short            endLocalInfo;        /* Above info is for one machine only.       */
  48.  
  49.     Handle            textHndl;            /* Temporarily holds opened document text. */
  50.     TEHandle        inBox;                /* Handles to TextEdit in-box.               */
  51.     TEHandle        outBox;                /* Handles to TextEdit out-box.               */
  52. } TheDoc, *TheDocPtr, **TheDocHndl;
  53.  
  54. typedef struct {
  55.     FileStateRec    fileState;
  56.     TheDoc            doc;
  57. } FileRec, *FileRecPtr, **FileRecHndl;
  58.  
  59. /********/
  60.  
  61. #define kCustomEventClass  'CUST'
  62. #define keyAppMessage      'KMSG'
  63. #define keyFSS             'KFSS'
  64. #define keyPascal          'PSTR'
  65. #define keyAppConnect      'KCNT'
  66. #define keyWindowID           'KWND'
  67.  
  68. #define typeAppConnect     'KCNT'
  69. #define typeAppMessage     'KMSG'
  70. #define typeDoubleLong     'DBLL'
  71. #define typeKFSS           'KFSS'        /* 2/20/91 pvh - changed from typeFSS which was defined in AppleEvents.h */
  72. #define typePascal         'PSTR'
  73. #define typeTextMessage    'KTXT'
  74.  
  75. #define keyReplyErr        'errn'
  76.  
  77. #define kVersion        100
  78. #define kWrongVersion    100
  79.  
  80. #define kInvalVRefNum    0
  81.  
  82. #define kSaveYes        1
  83. #define kSaveNo            3
  84. #define kSaveCanceled    4
  85.  
  86. #define kOpenYes        1
  87. #define kOpenNo            3
  88.  
  89. #define kDisconnectMssg    0
  90. #define kTextMssg        1
  91.  
  92. #define kMaxNumWindows        65535
  93. #define kMinWindowWidth        200
  94. #define kMinWindowHeight    200
  95. #define kMaxWindowWidth        2000
  96. #define kMaxWindowHeight    2000
  97.  
  98. #endif __CSHELL__
  99.